package com.dosh;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
/**
 * This class builds the container for the other admin classes
 */
public class Administration extends TabActivity {
	/**
	 * This method loads all Buttons and Textfields.
	 */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.admin);
        
        TabHost tabHost = getTabHost();
        // Settings for Tab User
        TabSpec userspec = tabHost.newTabSpec("User");
        userspec.setIndicator("User");
        Intent userIntent = new Intent(this, Admin_User.class);
        userspec.setContent(userIntent);
        
        // Settings for Tab Budget
        TabSpec budspec = tabHost.newTabSpec("Budgets");
        budspec.setIndicator("Budgets");
        Intent budgetIntent = new Intent(this, Admin_Budget.class);
        budspec.setContent(budgetIntent);
        
        // Settings for Tab Category
        TabSpec catspec = tabHost.newTabSpec("Categories");
        catspec.setIndicator("Categories");
        Intent categoryIntent = new Intent(this, Admin_Category.class);
        catspec.setContent(categoryIntent);
        
        // Settings for Tab Item
        TabSpec itmspec = tabHost.newTabSpec("Items");
        itmspec.setIndicator("Items");
        Intent itemIntent = new Intent(this, Admin_Item.class);
        itmspec.setContent(itemIntent);
        
        // Adding all TabSpec to TabHost
        tabHost.addTab(userspec);
        tabHost.addTab(budspec);
        tabHost.addTab(catspec);
        tabHost.addTab(itmspec);
    }
   
}